package org.xtext.example.mydsl.serializer;

import com.google.inject.Inject;
import com.google.inject.Provider;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
import org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
import org.xtext.example.mydsl.myDsl.Application;
import org.xtext.example.mydsl.myDsl.ApplicationUsesSDK;
import org.xtext.example.mydsl.myDsl.ArrayRA;
import org.xtext.example.mydsl.myDsl.BitmapDrawableResource;
import org.xtext.example.mydsl.myDsl.BooleanRA;
import org.xtext.example.mydsl.myDsl.BooleanResource;
import org.xtext.example.mydsl.myDsl.BooleanVA;
import org.xtext.example.mydsl.myDsl.Button;
import org.xtext.example.mydsl.myDsl.ColorRA;
import org.xtext.example.mydsl.myDsl.ColorResource;
import org.xtext.example.mydsl.myDsl.ColorVA;
import org.xtext.example.mydsl.myDsl.DimensionRA;
import org.xtext.example.mydsl.myDsl.DimensionResource;
import org.xtext.example.mydsl.myDsl.DimensionVA;
import org.xtext.example.mydsl.myDsl.DrawableRA;
import org.xtext.example.mydsl.myDsl.EditText;
import org.xtext.example.mydsl.myDsl.GoToURLAction;
import org.xtext.example.mydsl.myDsl.ImageView;
import org.xtext.example.mydsl.myDsl.IntegerArrayResource;
import org.xtext.example.mydsl.myDsl.IntegerRA;
import org.xtext.example.mydsl.myDsl.IntegerResource;
import org.xtext.example.mydsl.myDsl.IntegerVA;
import org.xtext.example.mydsl.myDsl.InvokeScreenAction;
import org.xtext.example.mydsl.myDsl.Layout;
import org.xtext.example.mydsl.myDsl.LayoutDimensionVA;
import org.xtext.example.mydsl.myDsl.LayoutProperties;
import org.xtext.example.mydsl.myDsl.MyDslPackage;
import org.xtext.example.mydsl.myDsl.Screen;
import org.xtext.example.mydsl.myDsl.ShowLayoutAction;
import org.xtext.example.mydsl.myDsl.Spinner;
import org.xtext.example.mydsl.myDsl.StringArrayResource;
import org.xtext.example.mydsl.myDsl.StringRA;
import org.xtext.example.mydsl.myDsl.StringResource;
import org.xtext.example.mydsl.myDsl.StringVA;
import org.xtext.example.mydsl.myDsl.TextView;
import org.xtext.example.mydsl.myDsl.TransitionDrawableResource;
import org.xtext.example.mydsl.myDsl.ViewCollection;
import org.xtext.example.mydsl.services.MyDslGrammarAccess;

@SuppressWarnings("restriction")
public class AbstractMyDslSemanticSequencer extends AbstractSemanticSequencer {

	@Inject
	protected MyDslGrammarAccess grammarAccess;
	
	@Inject
	protected ISemanticSequencerDiagnosticProvider diagnosticProvider;
	
	@Inject
	protected ITransientValueService transientValues;
	
	@Inject
	@GenericSequencer
	protected Provider<ISemanticSequencer> genericSequencerProvider;
	
	protected ISemanticSequencer genericSequencer;
	
	
	@Override
	public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
		super.init(sequencer, sequenceAcceptor, errorAcceptor);
		this.genericSequencer = genericSequencerProvider.get();
		this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
	}
	
	public void createSequence(EObject context, EObject semanticObject) {
		if(semanticObject.eClass().getEPackage() == MyDslPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
			case MyDslPackage.APPLICATION:
				if(context == grammarAccess.getApplicationRule()) {
					sequence_Application(context, (Application) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.APPLICATION_USES_SDK:
				if(context == grammarAccess.getApplicationUsesSDKRule()) {
					sequence_ApplicationUsesSDK(context, (ApplicationUsesSDK) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.ARRAY_RA:
				if(context == grammarAccess.getArrayRARule()) {
					sequence_ArrayRA(context, (ArrayRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.BITMAP_DRAWABLE_RESOURCE:
				if(context == grammarAccess.getBitmapDrawableResourceRule() ||
				   context == grammarAccess.getDrawableResourceRule() ||
				   context == grammarAccess.getResourceRule()) {
					sequence_BitmapDrawableResource(context, (BitmapDrawableResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.BOOLEAN_RA:
				if(context == grammarAccess.getBooleanRARule() ||
				   context == grammarAccess.getBooleanVARule() ||
				   context == grammarAccess.getResourceAccessRule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_BooleanRA(context, (BooleanRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.BOOLEAN_RESOURCE:
				if(context == grammarAccess.getBooleanResourceRule() ||
				   context == grammarAccess.getResourceRule()) {
					sequence_BooleanResource(context, (BooleanResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.BOOLEAN_VA:
				if(context == grammarAccess.getBooleanVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_BooleanVA(context, (BooleanVA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.BUTTON:
				if(context == grammarAccess.getButtonRule() ||
				   context == grammarAccess.getViewRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_Button(context, (Button) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.COLOR_RA:
				if(context == grammarAccess.getAnyDrawableVARule() ||
				   context == grammarAccess.getColorRARule() ||
				   context == grammarAccess.getColorVARule() ||
				   context == grammarAccess.getResourceAccessRule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_ColorRA(context, (ColorRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.COLOR_RESOURCE:
				if(context == grammarAccess.getColorResourceRule() ||
				   context == grammarAccess.getResourceRule()) {
					sequence_ColorResource(context, (ColorResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.COLOR_VA:
				if(context == grammarAccess.getAnyDrawableVARule() ||
				   context == grammarAccess.getColorVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_ColorVA(context, (ColorVA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.DIMENSION_RA:
				if(context == grammarAccess.getDimensionRARule() ||
				   context == grammarAccess.getDimensionVARule() ||
				   context == grammarAccess.getLayoutDimensionVARule() ||
				   context == grammarAccess.getResourceAccessRule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_DimensionRA(context, (DimensionRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.DIMENSION_RESOURCE:
				if(context == grammarAccess.getDimensionResourceRule() ||
				   context == grammarAccess.getResourceRule()) {
					sequence_DimensionResource(context, (DimensionResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.DIMENSION_VA:
				if(context == grammarAccess.getDimensionVARule() ||
				   context == grammarAccess.getLayoutDimensionVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_DimensionVA(context, (DimensionVA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.DRAWABLE_RA:
				if(context == grammarAccess.getAnyDrawableVARule() ||
				   context == grammarAccess.getDrawableRARule() ||
				   context == grammarAccess.getDrawableVARule() ||
				   context == grammarAccess.getResourceAccessRule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_DrawableRA(context, (DrawableRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.EDIT_TEXT:
				if(context == grammarAccess.getEditTextRule() ||
				   context == grammarAccess.getViewRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_EditText(context, (EditText) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.GO_TO_URL_ACTION:
				if(context == grammarAccess.getActionRule() ||
				   context == grammarAccess.getGoToURLActionRule()) {
					sequence_GoToURLAction(context, (GoToURLAction) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.IMAGE_VIEW:
				if(context == grammarAccess.getImageViewRule() ||
				   context == grammarAccess.getViewRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_ImageView(context, (ImageView) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.INTEGER_ARRAY_RESOURCE:
				if(context == grammarAccess.getArrayResourceRule() ||
				   context == grammarAccess.getIntegerArrayResourceRule() ||
				   context == grammarAccess.getResourceRule()) {
					sequence_IntegerArrayResource(context, (IntegerArrayResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.INTEGER_RA:
				if(context == grammarAccess.getIntegerRARule() ||
				   context == grammarAccess.getIntegerVARule() ||
				   context == grammarAccess.getResourceAccessRule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_IntegerRA(context, (IntegerRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.INTEGER_RESOURCE:
				if(context == grammarAccess.getIntegerResourceRule() ||
				   context == grammarAccess.getResourceRule()) {
					sequence_IntegerResource(context, (IntegerResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.INTEGER_VA:
				if(context == grammarAccess.getIntegerVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_IntegerVA(context, (IntegerVA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.INVOKE_SCREEN_ACTION:
				if(context == grammarAccess.getButtonTargetRule()) {
					sequence_ButtonTarget(context, (InvokeScreenAction) semanticObject); 
					return; 
				}
				else if(context == grammarAccess.getActionRule() ||
				   context == grammarAccess.getInvokeScreenActionRule()) {
					sequence_InvokeScreenAction(context, (InvokeScreenAction) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.LAYOUT:
				if(context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getViewRule()) {
					sequence_Layout(context, (Layout) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.LAYOUT_DIMENSION_VA:
				if(context == grammarAccess.getLayoutDimensionVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_LayoutDimensionVA(context, (LayoutDimensionVA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.LAYOUT_PROPERTIES:
				if(context == grammarAccess.getLayoutPropertiesRule()) {
					sequence_LayoutProperties(context, (LayoutProperties) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.SCREEN:
				if(context == grammarAccess.getScreenRule()) {
					sequence_Screen(context, (Screen) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.SHOW_LAYOUT_ACTION:
				if(context == grammarAccess.getActionRule() ||
				   context == grammarAccess.getShowLayoutActionRule()) {
					sequence_ShowLayoutAction(context, (ShowLayoutAction) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.SPINNER:
				if(context == grammarAccess.getSpinnerRule() ||
				   context == grammarAccess.getViewRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_Spinner(context, (Spinner) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.STRING_ARRAY_RESOURCE:
				if(context == grammarAccess.getArrayResourceRule() ||
				   context == grammarAccess.getResourceRule() ||
				   context == grammarAccess.getStringArrayResourceRule()) {
					sequence_StringArrayResource(context, (StringArrayResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.STRING_RA:
				if(context == grammarAccess.getResourceAccessRule() ||
				   context == grammarAccess.getStringRARule() ||
				   context == grammarAccess.getStringVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_StringRA(context, (StringRA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.STRING_RESOURCE:
				if(context == grammarAccess.getResourceRule() ||
				   context == grammarAccess.getStringResourceRule()) {
					sequence_StringResource(context, (StringResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.STRING_VA:
				if(context == grammarAccess.getStringVARule() ||
				   context == grammarAccess.getValueAccessRule()) {
					sequence_StringVA(context, (StringVA) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.TEXT_VIEW:
				if(context == grammarAccess.getTextViewRule() ||
				   context == grammarAccess.getViewRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_TextView(context, (TextView) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.TRANSITION_DRAWABLE_RESOURCE:
				if(context == grammarAccess.getDrawableResourceRule() ||
				   context == grammarAccess.getResourceRule() ||
				   context == grammarAccess.getTransitionDrawableResourceRule()) {
					sequence_TransitionDrawableResource(context, (TransitionDrawableResource) semanticObject); 
					return; 
				}
				else break;
			case MyDslPackage.VIEW_COLLECTION:
				if(context == grammarAccess.getViewCollectionRule()) {
					sequence_ViewCollection(context, (ViewCollection) semanticObject); 
					return; 
				}
				else break;
			}
		if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
	}
	
	/**
	 * Constraint:
	 *     (minSdkVersion=INT? maxSdkVersion=INT? targetSdkVersion=INT?)
	 */
	protected void sequence_ApplicationUsesSDK(EObject context, ApplicationUsesSDK semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         name=STRING 
	 *         packageName=PackageName 
	 *         (versionCode=INT versionName=STRING)? 
	 *         sdkVersion=ApplicationUsesSDK? 
	 *         (screens+=Screen | layouts+=Layout | resources+=Resource)+
	 *     )
	 */
	protected void sequence_Application(EObject context, Application semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[ArrayResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_ArrayRA(EObject context, ArrayRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID filename=ID)
	 */
	protected void sequence_BitmapDrawableResource(EObject context, BitmapDrawableResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.BITMAP_DRAWABLE_RESOURCE__FILENAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.BITMAP_DRAWABLE_RESOURCE__FILENAME));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getBitmapDrawableResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getBitmapDrawableResourceAccess().getFilenameIDTerminalRuleCall_2_0(), semanticObject.getFilename());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[BooleanResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_BooleanRA(EObject context, BooleanRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID value=BOOL)
	 */
	protected void sequence_BooleanResource(EObject context, BooleanResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.BOOLEAN_RESOURCE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.BOOLEAN_RESOURCE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getBooleanResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getBooleanResourceAccess().getValueBOOLParserRuleCall_2_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=BOOL
	 */
	protected void sequence_BooleanVA(EObject context, BooleanVA semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.BOOLEAN_VA__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.BOOLEAN_VA__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getBooleanVAAccess().getValueBOOLParserRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     screen=[Screen|ID]
	 */
	protected void sequence_ButtonTarget(EObject context, InvokeScreenAction semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.INVOKE_SCREEN_ACTION__SCREEN) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.INVOKE_SCREEN_ACTION__SCREEN));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getButtonTargetAccess().getScreenScreenIDTerminalRuleCall_1_0_1(), semanticObject.getScreen());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         name=ID? 
	 *         (text=StringVA | src=AnyDrawableVA) 
	 *         onClick=ButtonTarget? 
	 *         layoutProperties=LayoutProperties? 
	 *         top=DimensionVA? 
	 *         left=DimensionVA? 
	 *         width=DimensionVA? 
	 *         height=DimensionVA? 
	 *         background=AnyDrawableVA? 
	 *         clickable=BooleanVA? 
	 *         onClick=Action? 
	 *         hint=StringVA?
	 *     )
	 */
	protected void sequence_Button(EObject context, Button semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[ColorResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_ColorRA(EObject context, ColorRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID value=HEX_COLOR)
	 */
	protected void sequence_ColorResource(EObject context, ColorResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.COLOR_RESOURCE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.COLOR_RESOURCE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getColorResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getColorResourceAccess().getValueHEX_COLORTerminalRuleCall_2_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=HEX_COLOR
	 */
	protected void sequence_ColorVA(EObject context, ColorVA semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.COLOR_VA__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.COLOR_VA__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getColorVAAccess().getValueHEX_COLORTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[DimensionResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_DimensionRA(EObject context, DimensionRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID value=DimensionValue)
	 */
	protected void sequence_DimensionResource(EObject context, DimensionResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.DIMENSION_RESOURCE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.DIMENSION_RESOURCE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getDimensionResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getDimensionResourceAccess().getValueDimensionValueParserRuleCall_2_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=DimensionValue
	 */
	protected void sequence_DimensionVA(EObject context, DimensionVA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[DrawableResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_DrawableRA(EObject context, DrawableRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         name=ID? 
	 *         text=StringVA? 
	 *         layoutProperties=LayoutProperties? 
	 *         top=DimensionVA? 
	 *         left=DimensionVA? 
	 *         width=DimensionVA? 
	 *         height=DimensionVA? 
	 *         background=AnyDrawableVA? 
	 *         clickable=BooleanVA? 
	 *         fadeScrollBars=BooleanVA? 
	 *         isScrollContainer=BooleanVA? 
	 *         onClick=Action? 
	 *         autoLink=AutoLinkKind? 
	 *         autoText=BooleanVA? 
	 *         capitalize=CapitalizeKind? 
	 *         digits=StringVA? 
	 *         editable=BooleanVA? 
	 *         gravity=LayoutGravityKind? 
	 *         hint=StringVA? 
	 *         numeric=BooleanVA? 
	 *         password=BooleanVA? 
	 *         phoneNumber=BooleanVA? 
	 *         singleLine=BooleanVA? 
	 *         textColor=ColorVA? 
	 *         typeface=TypefaceKind? 
	 *         textSize=DimensionVA? 
	 *         (textStyle+=TextStyleKind textStyle+=TextStyleKind*)?
	 *     )
	 */
	protected void sequence_EditText(EObject context, EditText semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     url=STRING
	 */
	protected void sequence_GoToURLAction(EObject context, GoToURLAction semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.GO_TO_URL_ACTION__URL) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.GO_TO_URL_ACTION__URL));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getGoToURLActionAccess().getUrlSTRINGTerminalRuleCall_1_0(), semanticObject.getUrl());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         name=ID? 
	 *         src=AnyDrawableVA 
	 *         layoutProperties=LayoutProperties? 
	 *         top=DimensionVA? 
	 *         left=DimensionVA? 
	 *         width=DimensionVA? 
	 *         height=DimensionVA? 
	 *         background=AnyDrawableVA? 
	 *         clickable=BooleanVA? 
	 *         fadeScrollBars=BooleanVA? 
	 *         isScrollContainer=BooleanVA? 
	 *         onClick=Action?
	 *     )
	 */
	protected void sequence_ImageView(EObject context, ImageView semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID items+=INT items+=INT*)
	 */
	protected void sequence_IntegerArrayResource(EObject context, IntegerArrayResource semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[IntegerResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_IntegerRA(EObject context, IntegerRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID value=INT)
	 */
	protected void sequence_IntegerResource(EObject context, IntegerResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.INTEGER_RESOURCE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.INTEGER_RESOURCE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getIntegerResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getIntegerResourceAccess().getValueINTTerminalRuleCall_2_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=INT
	 */
	protected void sequence_IntegerVA(EObject context, IntegerVA semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.INTEGER_VA__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.INTEGER_VA__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getIntegerVAAccess().getValueINTTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     screen=[Screen|ID]
	 */
	protected void sequence_InvokeScreenAction(EObject context, InvokeScreenAction semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.INVOKE_SCREEN_ACTION__SCREEN) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.INVOKE_SCREEN_ACTION__SCREEN));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getInvokeScreenActionAccess().getScreenScreenIDTerminalRuleCall_1_0_1(), semanticObject.getScreen());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     const_value=LayoutDimensionKind
	 */
	protected void sequence_LayoutDimensionVA(EObject context, LayoutDimensionVA semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.LAYOUT_DIMENSION_VA__CONST_VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.LAYOUT_DIMENSION_VA__CONST_VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getLayoutDimensionVAAccess().getConst_valueLayoutDimensionKindEnumRuleCall_1_0(), semanticObject.getConst_value());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         layout_height=LayoutDimensionVA? 
	 *         layout_width=LayoutDimensionVA? 
	 *         layout_weight=IntegerVA? 
	 *         layout_marginBottom=DimensionVA? 
	 *         layout_marginLeft=DimensionVA? 
	 *         layout_marginRight=DimensionVA? 
	 *         layout_marginTop=DimensionVA? 
	 *         layout_above=[View|ID]? 
	 *         layout_alignBaseline=[View|ID]? 
	 *         layout_alignBottom=[View|ID]? 
	 *         layout_alignLeft=[View|ID]? 
	 *         layout_alignParentBottom=BooleanVA? 
	 *         layout_alignParentLeft=BooleanVA? 
	 *         layout_alignParentRight=BooleanVA? 
	 *         layout_alignParentTop=BooleanVA? 
	 *         layout_alignTop=[View|ID]? 
	 *         layout_alignWithParentIfMissing=BooleanVA? 
	 *         layout_below=[View|ID]? 
	 *         layout_centerHorizontal=BooleanVA? 
	 *         layout_centerInParent=BooleanVA? 
	 *         layout_centerVertical=BooleanVA? 
	 *         layout_toLeftOf=[View|ID]? 
	 *         layout_toRightOf=[View|ID]?
	 *     )
	 */
	protected void sequence_LayoutProperties(EObject context, LayoutProperties semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         isRelative?='relative'? 
	 *         name=ID 
	 *         alpha=FLOAT? 
	 *         background=AnyDrawableVA? 
	 *         minHeight=DimensionVA? 
	 *         minWidth=DimensionVA? 
	 *         nextFocusDown=[View|ID]? 
	 *         nextFocusLeft=[View|ID]? 
	 *         nextFocusRight=[View|ID]? 
	 *         nextFocusUp=[View|ID]? 
	 *         onClick=Action? 
	 *         padding=DimensionVA? 
	 *         paddingBottom=DimensionVA? 
	 *         paddingLeft=DimensionVA? 
	 *         paddingRight=DimensionVA? 
	 *         paddingTop=DimensionVA? 
	 *         rotation=DimensionVA? 
	 *         rotationX=DimensionVA? 
	 *         rotationY=DimensionVA? 
	 *         saveEnabled=BooleanVA? 
	 *         scaleX=DimensionVA? 
	 *         scaleY=DimensionVA? 
	 *         scrollX=DimensionVA? 
	 *         scrollY=DimensionVA? 
	 *         scrollbars=BooleanVA? 
	 *         transformPivotX=DimensionVA? 
	 *         transformPivotY=DimensionVA? 
	 *         translationX=DimensionVA? 
	 *         translationY=DimensionVA? 
	 *         visibility=LayoutVisibilityKind? 
	 *         layoutProperties=LayoutProperties? 
	 *         (gravity+=LayoutGravityKind gravity+=LayoutGravityKind*)? 
	 *         orientation=LayoutOrientationKind? 
	 *         views=ViewCollection
	 *     )
	 */
	protected void sequence_Layout(EObject context, Layout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID (layout=[Layout|ID] | widgets=ViewCollection))
	 */
	protected void sequence_Screen(EObject context, Screen semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     layout=[Layout|ID]
	 */
	protected void sequence_ShowLayoutAction(EObject context, ShowLayoutAction semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.SHOW_LAYOUT_ACTION__LAYOUT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.SHOW_LAYOUT_ACTION__LAYOUT));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getShowLayoutActionAccess().getLayoutLayoutIDTerminalRuleCall_1_0_1(), semanticObject.getLayout());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         name=ID? 
	 *         prompt=StringVA 
	 *         layoutProperties=LayoutProperties? 
	 *         top=DimensionVA? 
	 *         left=DimensionVA? 
	 *         width=DimensionVA? 
	 *         height=DimensionVA? 
	 *         background=AnyDrawableVA? 
	 *         clickable=BooleanVA? 
	 *         fadeScrollBars=BooleanVA? 
	 *         isScrollContainer=BooleanVA? 
	 *         onClick=Action?
	 *     )
	 */
	protected void sequence_Spinner(EObject context, Spinner semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID items+=STRING items+=STRING*)
	 */
	protected void sequence_StringArrayResource(EObject context, StringArrayResource semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     ((package=PackageName? resource=[StringResource|ID]) | (package=PackageName? externalResource=ID))
	 */
	protected void sequence_StringRA(EObject context, StringRA semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID value=STRING)
	 */
	protected void sequence_StringResource(EObject context, StringResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.STRING_RESOURCE__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.STRING_RESOURCE__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getStringResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getStringResourceAccess().getValueSTRINGTerminalRuleCall_2_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     value=STRING
	 */
	protected void sequence_StringVA(EObject context, StringVA semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.STRING_VA__VALUE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.STRING_VA__VALUE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getStringVAAccess().getValueSTRINGTerminalRuleCall_1_0(), semanticObject.getValue());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         name=ID? 
	 *         text=StringVA 
	 *         layoutProperties=LayoutProperties? 
	 *         top=DimensionVA? 
	 *         left=DimensionVA? 
	 *         width=DimensionVA? 
	 *         height=DimensionVA? 
	 *         background=AnyDrawableVA? 
	 *         clickable=BooleanVA? 
	 *         fadeScrollBars=BooleanVA? 
	 *         isScrollContainer=BooleanVA? 
	 *         onClick=Action? 
	 *         autoLink=AutoLinkKind? 
	 *         autoText=BooleanVA? 
	 *         capitalize=CapitalizeKind? 
	 *         digits=StringVA? 
	 *         editable=BooleanVA? 
	 *         gravity=LayoutGravityKind? 
	 *         hint=StringVA? 
	 *         numeric=BooleanVA? 
	 *         password=BooleanVA? 
	 *         phoneNumber=BooleanVA? 
	 *         singleLine=BooleanVA? 
	 *         textColor=ColorVA? 
	 *         typeface=TypefaceKind? 
	 *         textSize=DimensionVA? 
	 *         (textStyle+=TextStyleKind textStyle+=TextStyleKind*)?
	 *     )
	 */
	protected void sequence_TextView(EObject context, TextView semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID from=[BitmapDrawableResource|ID] to=[BitmapDrawableResource|ID])
	 */
	protected void sequence_TransitionDrawableResource(EObject context, TransitionDrawableResource semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.RESOURCE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.RESOURCE__NAME));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.TRANSITION_DRAWABLE_RESOURCE__FROM) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.TRANSITION_DRAWABLE_RESOURCE__FROM));
			if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.TRANSITION_DRAWABLE_RESOURCE__TO) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.TRANSITION_DRAWABLE_RESOURCE__TO));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getTransitionDrawableResourceAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getTransitionDrawableResourceAccess().getFromBitmapDrawableResourceIDTerminalRuleCall_1_0_1(), semanticObject.getFrom());
		feeder.accept(grammarAccess.getTransitionDrawableResourceAccess().getToBitmapDrawableResourceIDTerminalRuleCall_3_0_1(), semanticObject.getTo());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     views+=View+
	 */
	protected void sequence_ViewCollection(EObject context, ViewCollection semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
}
